import React,{Component} from 'react';

class UnControlledForm extends Component{

	constructor(props){
		super(props);
		this.handleSubmit = this.handleSubmit.bind(this);
	}

	handleSubmit(e){
		e.preventDefault();
		console.log("Value: ",this.input.value);
	}

	render(){
		return (
			<form onSubmit={this.handleSubmit}>
				<input 
					type='text'
					ref={(input)=>this.input = input}/>
					<button type='submit'>Submit</button>
			</form>
			)
	}
}

export default UnControlledForm;